package com.sdry.service.impl.zc;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sdry.mapper.hpf.BomMapper;
import com.sdry.mapper.hpf.PickApplyDetailMapper;
import com.sdry.mapper.hpf.PickApplyMapper;
import com.sdry.mapper.hpf.ProductMapper;
import com.sdry.mapper.zc.ZcProductTracingMapper;
import com.sdry.model.hpf.Bom;
import com.sdry.model.hpf.PickApply;
import com.sdry.model.hpf.Product;
import com.sdry.model.jyy.Cut;
import com.sdry.model.jyy.Shedudetail;
import com.sdry.model.workplace.Assemble;
import com.sdry.model.workplace.Centrifugal;
import com.sdry.model.zc.ZcEvaluateEntity;
import com.sdry.model.zc.ZcGasEntity;
import com.sdry.model.zc.ZcLeakHuntingEntity;
import com.sdry.model.zc.ZcProductTracingByOddNumberEntity;
import com.sdry.model.zc.ZcQueryCriteria;
import com.sdry.service.zc.ZcProductTracingService;
/**
 * 
 * @ClassName:    ZcProductTracingServiceImpl   
 * @Description:  产品追溯
 * @Author:       zc   
 * @CreateDate:   2018年11月30日 下午4:15:47   
 * @Version:      v1.0
 */
@Service
public class ZcProductTracingServiceImpl implements ZcProductTracingService {

	@Resource
	private ZcProductTracingMapper zcProductTracingMapper;
	@Resource
	private PickApplyMapper pickApplyMapper;
	@Resource
	private BomMapper bomMapper;
	@Resource
	private ProductMapper productMapper;
	/**
	 * 通过产品条码查询装丝信息
	 */
	@Override
	public List<Assemble> selectZsInfoByCode(String productCode) {
		return zcProductTracingMapper.selectZsInfoByCode(productCode);
	}
	/**
	 * 通过产品条码查询装丝信息数量
	 */
	@Override
	public int countZsInfoByCode(String productCode) {
		return zcProductTracingMapper.countZsInfoByCode(productCode);
	}
	/**
	 * 通过产品条码查询浇铸信息
	 */
	@Override
	public List<Centrifugal> selectJzInfoByCode(String productCode) {
		return zcProductTracingMapper.selectJzInfoByCode(productCode);
	}
	/**
	 * 通过产品条码查询浇铸信息数量
	 */
	@Override
	public int countJzInfoByCode(String productCode) {
		return zcProductTracingMapper.countJzInfoByCode(productCode);
	}
	
	/**
	 * 通过产品条码查询切割信息
	 */
	@Override
	public List<Cut> selectCutInfoByCode(String productCode) {
		return zcProductTracingMapper.selectCutInfoByCode(productCode);
	}
	/**
	 * 通过产品条码查询切割信息数量
	 */
	@Override
	public int countCutInfoByCode(String productCode) {
		return zcProductTracingMapper.countCutInfoByCode(productCode);
	}
	/**
	 * 通过产品条码查询检漏信息
	 */
	@Override
	public List<ZcLeakHuntingEntity> selectLeakHuntingInfoByCode(String productCode) {
		return zcProductTracingMapper.selectLeakHuntingInfoByCode(productCode);
	}
	/**
	 * 通过产品条码查询检漏信息数量
	 */
	@Override
	public int countLeakHuntingInfoByCode(String productCode) {
		return zcProductTracingMapper.countLeakHuntingInfoByCode(productCode);
	}
	/**
	 * 通过产品条码查询历史检漏信息
	 */
	@Override
	public List<ZcLeakHuntingEntity> selectLeakHuntingInfoLogByCode(String productCode) {
		return zcProductTracingMapper.selectLeakHuntingInfoLogByCode(productCode);
	}
	/**
	 * 通过产品条码查询历史检漏信息数量
	 */
	@Override
	public int countLeakHuntingInfoLogByCode(String productCode) {
		return zcProductTracingMapper.countLeakHuntingInfoLogByCode(productCode);
	}
	/**
	 * 通过产品条码查询组件评价信息
	 */
	@Override
	public List<ZcEvaluateEntity> selectEvaluateInfoByCode(String productCode) {
		return zcProductTracingMapper.selectEvaluateInfoByCode(productCode);
	}
	/**
	 * 通过产品条码查询组件评价信息数量
	 */
	@Override
	public int countEvaluateInfoByCode(String productCode) {
		return zcProductTracingMapper.countEvaluateInfoByCode(productCode);
	}
	/**
	 * 通过产品条码查询历史组件评价信息
	 */
	@Override
	public List<ZcEvaluateEntity> selectEvaluateInfoLogByCode(String productCode) {
		return zcProductTracingMapper.selectEvaluateInfoLogByCode(productCode);
	}
	/**
	 * 通过产品条码查询历史组件评价信息数量
	 */
	@Override
	public int countEvaluateInfoLogByCode(String productCode) {
		return zcProductTracingMapper.countEvaluateInfoLogByCode(productCode);
	}
	/**
	 * 通过产品条码查询气密性检测信息
	 */
	@Override
	public List<ZcGasEntity> selectGasInfoByCode(String productCode) {
		return zcProductTracingMapper.selectGasInfoByCode(productCode);
	}
	/**
	 * 通过产品条码查询气密性检测信息数量
	 */
	@Override
	public int countGasInfoByCode(String productCode) {
		return zcProductTracingMapper.countGasInfoByCode(productCode);
	}
	/**
	 * 通过产品条码查询历史气密性检测信息
	 */
	@Override
	public List<ZcGasEntity> selectGasInfoLogByCode(String productCode) {
		return zcProductTracingMapper.selectGasInfoLogByCode(productCode);
	}
	/**
	 * 通过产品条码查询历史气密性检测信息数量
	 */
	@Override
	public int countGasInfoLogByCode(String productCode) {
		return zcProductTracingMapper.countGasInfoLogByCode(productCode);
	}
	/**
	 * 通过排产单追溯
	 */
	@Override
	public ZcProductTracingByOddNumberEntity selectProductTracingByOddNumber(ZcQueryCriteria zcQueryCriteria) {
		return zcProductTracingMapper.selectProductTracingByOddNumber(zcQueryCriteria);
	}
}
